/// @tags:
#include <cstdio>
#include <functional>
#include <iostream>
#include <numeric>

using std::cin, std::cout, std::endl;

namespace BlueQuantum {

long long n;

int main() {
  cin >> n;
  n -= 1;
  int d = n / (int)1e5;
  cout << d + 1 << d + 1;
  n %= (int)1e5;
  d = n / (int)1e4;
  cout << d;
  n %= (int)1e4;
  d = n / (int)1e3;
  cout << d;
  n %= (int)1e3;
  d = n / (int)1e2;
  cout << d << d;
  n %= (int)1e2;
  d = n / (int)1e1;
  int tmp = d;
  cout << d;
  n %= (int)1e1;
  cout << n;
  cout << tmp;
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("A - AABCDDEFE.in", "r", stdin);
  freopen("A - AABCDDEFE.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
